﻿namespace d2
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Random random = new Random();
            int[] nums = new int[100];

            for(int i = 0; i<100;i++)
            {
                nums[i] = random.Next(0, 1001);
            }

            var query = nums.OrderByDescending(x => x).ToArray();
            var sum = nums.Sum();
            double arry = sum / 100.0;

            for(int i = 0;i<100;i++)
            {
                Console.Write(query[i]+" ");
            }
            Console.WriteLine();
            Console.WriteLine("SUM=" + sum);
            Console.WriteLine("arr = "+arry);

        }
    }
}
